import { request } from '@pkg/request/src';

export enum Api {
  page = '/userGoods/page',
  getUserGoodsDetail = '/userGoods/get',
  getDianZiJinRecordList = '/userGoods/getDianZiJinRecordList',
  initFirstUseDay = '/userGoods/initFirstUseDay',
}

enum PayWayApi {
  list = '/payway/list',
}

export const payWayList = (ids: string) =>
  request.get(
    {
      url: PayWayApi.list,
      params: { ids: ids },
    },
    { errorMessageMode: 'none' },
  );

export const getUserGoodsDetail = params =>
  request.get(
    {
      url: Api.getUserGoodsDetail,
      params: params,
    },
    { errorMessageMode: 'none', successMessageMode: 'none' },
  );

export const initFirstUseDay = params =>
  request.post(
    {
      url: Api.initFirstUseDay,
      params: params,
    },
    { errorMessageMode: 'none' },
  );
